import request from '@/utils/request'

// 获取-权限点列表
export const getPermission = () => {
  return request({
    url: '/sys/permission'
  })
}
// 新增权限点接口
export const addPermission = data => {
  return request({
    url: '/sys/permission',
    method: 'POST',
    data
  })
}
// 获取权限点详情
export const detailPermission = id => {
  return request({
    url: `/sys/permission/${id}`
  })
}
// 删除权限
export const removePermission = id => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
// 编辑权限
export const compilePermission = data => {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'PUT',
    data
  })
}
